package com.jumptap.adtag.utils;

import android.content.Context;
import android.content.res.AssetManager;
import android.content.res.Resources;
import java.io.IOException;
import java.io.InputStream;

public class FileReaderUtil
{
  private static final int BUFFER_SIZE = 1024;

  public static StringBuilder getFileContent(Context paramContext, String paramString)
    throws JtException
  {
    StringBuilder localStringBuilder = null;
    if (0 == 0)
    {
      localStringBuilder = new StringBuilder();
      byte[] arrayOfByte = new byte[1024];
      InputStream localInputStream;
      try
      {
        localInputStream = paramContext.getResources().getAssets().open(paramString);
        while (true)
        {
          int i = localInputStream.read(arrayOfByte);
          if (i <= 0)
            break;
          localStringBuilder.append(new StringBuffer(new String(arrayOfByte, 0, i)));
        }
      }
      catch (IOException localIOException)
      {
        throw new JtException("Cannot load " + paramString + " from asset folder" + localIOException.getMessage());
      }
      localInputStream.close();
    }
    return localStringBuilder;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.jumptap.adtag.utils.FileReaderUtil
 * JD-Core Version:    0.6.2
 */